<template>
  <el-dialog :title="text.type" :visible.sync="isShow" v-if="isShow" width="30%">
      <div style="padding:10px 0px 8px 0px;">
          <div class="el-message-box__status el-icon-warning" style="top: 52%;"></div>
          <div class="el-message-box__message">
              <p>{{text.msg}}</p>
          </div>
      </div>
      <div style="margin-top:5px;text-align:right;margin-right:5px;">
          <button v-if="text.btn.confirmBtnText" type="button" class="el-button el-button--default el-button--small" @click="confirm">
              <span>
                  {{text.btn.confirmBtnText}}
              </span>
          </button>
          <button v-if="text.btn.cancelBtnText" type="button" class="el-button el-button--default el-button--small el-button--primary " @click="cancel">
              <span>
                  {{text.btn.cancelBtnText}}
              </span>
          </button>
      </div>
  </el-dialog>
</template>
<script>
export default {
  data() {
      return {
          isShow: true,
          text: {
              type: "提示",
              msg: "确定删除此条信息？",
              btn: {
                  confirmBtnText: "确定",
                  cancelBtnText: "取消",
              },
          },
      };
  },
  methods: {
      cancel() {},
      confirm() {},
  },
};
</script>
